<?php
$con = mysql_connect('127.0.0.1', 'root', '');
$db = mysql_selectdb('proc', $con);
$r=mysql_query(sprintf("update cmd set state=2,result='%s' where id='%s'",10,1));
var_dump($r);
?>